{% extends 'layout.html' %}

{% block content %}

    <div class="container">
        <form class="form-horizontal" method="post" novalidate>
            {% csrf_token %}
            {% for field in form %}
            <div class="form-group">
                <label for="inputEmail3" class="col-sm-2 control-label">{{ field.label }}</label>
                <div class="col-sm-10">
                    {{ field }}
                    <span style="color:red"> {{ field.errors.0 }}</span>
                </div>
            </div>
            {% endfor %}
            <div class="form-group">
                <div class="col-sm-offset-2 col-sm-10">
                    <button type="submit" class="btn btn-success">提交</button>
                </div>
            </div>
        </form>

    </div>
{% endblock %}